package controller;

import dao.AdminStatisticsDAO;

import java.sql.SQLException;
import java.util.Map;

/**
 * 管理员统计控制器
 */
public class AdminStatisticsController {
    private AdminStatisticsDAO adminStatisticsDAO;

    public AdminStatisticsController() {
        this.adminStatisticsDAO = new AdminStatisticsDAO();
    }

    /**
     * 获取系统总体统计信息
     */
    public Map<String, Object> getSystemOverviewStats() throws SQLException {
        return adminStatisticsDAO.getSystemOverviewStats();
    }

    /**
     * 获取系统预约趋势数据
     */
    public Map<String, Object> getSystemTrendData(String period) throws SQLException {
        return adminStatisticsDAO.getSystemTrendData(period);
    }

    /**
     * 获取系统时间段分布数据
     */
    public Map<String, Object> getSystemTimeSlotData(String period) throws SQLException {
        return adminStatisticsDAO.getSystemTimeSlotData(period);
    }

    /**
     * 获取区域使用分布数据
     */
    public Map<String, Object> getAreaDistributionData(String period) throws SQLException {
        return adminStatisticsDAO.getAreaDistributionData(period);
    }

    /**
     * 获取热力图数据
     */
    public Map<String, Object> getHeatmapData(String period) throws SQLException {
        return adminStatisticsDAO.getHeatmapData(period);
    }
}
